/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-03-20 22:18
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'name',
      rules: [],
      label: '按钮名称',
      extra: '',
    },
    attrs: {
      value: '测试',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入按钮名称'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'ghost',
      rules: [],
      label: '幽灵属性',
      extra: '幽灵属性，使按钮背景透明',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'icon',
      rules: [],
      label: '图标类型',
      extra: '设置按钮的图标类型',
    },
    attrs: {
      value: '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入图标类型'
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'shape',
      rules: [],
      label: '按钮形状',
      extra: '设置按钮形状，可选值为 circle、 round 或者不设',
    },
    attrs: {
      value: null,
      buttonStyle: 'solid',
      children: [
        {
          value: null,
          label: '-'
        },
        {
          value: 'circle',
          label: 'circle'
        },
        {
          value: 'round',
          label: 'round'
        }
      ]
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'size',
      rules: [],
      label: '按钮大小',
      extra: '设置按钮大小，可选值为 small large 或者不设',
    },
    attrs: {
      value: 'default',
      buttonStyle: 'solid',
      children: [
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'small',
          label: 'small'
        },
        {
          value: 'large',
          label: 'large'
        }
      ]
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'type',
      rules: [],
      label: '按钮类型',
      extra: '设置按钮类型，可选值为 primary dashed danger link 或者不设',
    },
    attrs: {
      value: 'default',
      buttonStyle: 'solid',
      children: [
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'primary',
          label: 'primary'
        },
        {
          value: 'dashed',
          label: 'dashed'
        },
        {
          value: 'danger',
          label: 'danger'
        },
        {
          value: 'link',
          label: 'link'
        }
      ]
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'block',
      rules: [],
      label: '按钮宽度',
      extra: '将按钮宽度调整为其父宽度的选项',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'layoutName',
      rules: [],
      label: '组件名称',
      extra: '在使用插槽时方，用于标识当前组件',
    },
    attrs: {
      value: Date.now() + '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入组件名称'
    }
  }
]
